<!DOCTYPE html >
<!--  Website template by freewebsitetemplates.com  -->
<html><!-- InstanceBegin template="/Templates/TDPetshop.dwt" codeOutsideHTMLIsLocked="false" -->

<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Contact Us</title>
<!-- InstanceEndEditable -->
<script src="http://code.jquery.com/jquery-latest.js" language="javascript" type="text/javascript"></script>
<meta  charset=iso-8859-1" />
	<link href="css/style.css" rel="stylesheet" type="text/css" />
	<!--[if IE 6]>
		<link href="css/ie6.css" rel="stylesheet" type="text/css" />
	<![endif]-->
	<!--[if IE 7]>
        <link href="css/ie7.css" rel="stylesheet" type="text/css" />  
	<![endif]-->
<link rel="icon" href="favicon.ico" type="image/x-icon"/>
<!--<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>-->
<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
<!--<script language="javascript" src="jquery.js" type="text/javascript"></script>
<script language="javascript" src="jquery.validate.min.js" type="text/javascript"></script>  -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="head" -->
<?php
require_once("validLogin.php");
require_once("Connections/cnn.php");
Validlogin();
?>
<script type="text/javascript" src="contact.js"></script>
<!-- InstanceEndEditable -->
</head>

<body>

	  
			<div id="header">
	           		<a href="index.php" id="logo"><img src="images/logo.gif" width="310" height="114" alt="" title=""></a>
					<ul class="navigation">
						<li class="active"><a href="index.php">Home</a></li>
						<li><a href="petmart.php">PetMart</a></li>
						<li><a href="about.php">About us</a></li>
						<li><a href="petguide.php">PetGuide</a></li>
						<li><a href="contact.php">Contact us</a></li>
                        <li><a href="login.php">Account</a></li>
					</ul>
			</div>
			
			<div id="body">
			
					<!-- InstanceBeginEditable name="body" -->
                    <?php
					$sID = $_SESSION['memberID'];
                    $sql_query = @mysql_query("SELECT * FROM Members WHERE ID='{$sID}'");
					$member = @mysql_fetch_array($sql_query);
					//echo $member['DOB'];
					?>
			       	<div id="content">
                    	<div class="content">
                            <div id="editprofile">
                            	<table border="0">
                                    <form name="contactForm" action="sendmail/sendmailProcess.php" method="post">
                                        <tr>
                                        <td colspan="5" id="error">Note: Change your infomation if you want</td>
                                        </tr>
                                        <tr>
                                        <td colspan="5">&nbsp;</td>
                                        <tr>
                                        <td><b>Name</b></td><td>:</td><td colspan="2"><input class="inputtext" type="text" id="fullname" name="fullname" value="<?php echo "$member[Firstname] $member[Lastname]" ?>" ></td>
                                        </tr>
                                        <tr>
                                        	<td></td>
                                            <td></td>
                                        	<td id="showMsgName" colspan="2"></td>
                                        </tr>
                                        <td colspan="5">&nbsp;</td>
                                        <tr>
                                        <td><b>Email</b></td><td>:</td><td colspan="2"><input class="inputtext" type="text" id="email" name="email" value="<?php echo "$member[Email]" ?>" ></td>
                                        </tr>
                                        <tr>
                                        	<td></td>
                                            <td></td>
                                        	<td id="showMsgEmail" colspan="2"></td>
                                        </tr>
                                        <td colspan="5">&nbsp;</td>
                                        <tr>
                                        <td><b>Subject</b></td><td>:</td><td colspan="2"><input type="text" id="subject" name="subject" placeholder="Type your subject" style="height:30px;width:500px;border-color:#FFF;border-radius:8px;background-color:#FC6;text-align:justify;text-indent:5px;"></td>  
                                        </tr>
                                        <tr>
                                        	<td></td>
                                            <td></td>
                                        	<td id="showMsgSubject"></td>
                                        </tr>
                                        <td colspan="5">&nbsp;</td>
                                        <tr>
                                        <td><b>Content</b></td><td>:</td><td colspan="2">
                                        <textarea class="inputtextfield" onKeyPress="return taLimit(this)" onKeyUp="return taCount(this,'myCounter')" id="content" name="content" rows=7 wrap="physical" cols=40></textarea>
                                        </td>
                                        </tr>
                                        <script language="javascript">
                                        //Count content
										maxL=2000;
										var bName = navigator.appName;
										function taLimit(taObj) 
										{
											if (taObj.value.length==maxL) return false;
											return true;
										}
										
										function taCount(taObj,Cnt) 
										{ 
											objCnt=createObject(Cnt);
											objVal=taObj.value;
											if (objVal.length>maxL) objVal=objVal.substring(0,maxL);
											if (objCnt) 
											{
												if(bName == "Netscape")
												{	
													objCnt.textContent=maxL-objVal.length;
												}
												else
												{
													objCnt.innerText=maxL-objVal.length;
												}
											}
											return true;
										}
										function createObject(objId) 
										{
											if (document.getElementById) return document.getElementById(objId);
											else if (document.layers) return eval("document." + objId);
											else if (document.all) return eval("document.all." + objId);
											else return eval("document." + objId);
										}//End Count content
                                        </script>
                                        <tr>
                                        <td></td>
                                        <td></td>
                                        <td>You have <b><label id="myCounter">2000</label></b> characters left</td>
                                        </tr>
                                        <table align="center" border="0">
                                        <tr>
                                            <td colspan="4" align="center">
                                                <input class="button" type="submit" value="Send" id="submit" onClick="return confirmBtn();"/>
                                                <input class="button" type="button" value="Cancel" onclick="location.href='index.php';" />
                                                <input class="button" type="button" value="Refresh" onclick="location.href='contact.php'" />
                                            </td>
                                        </tr>
                                        <script>
											function confirmBtn()
											{
												if(document.getElementById("subject").value == "")
												{
													alert("Message doesn't have the Subject");
													return false;
												}
												else
												{
													if(document.contactForm.content.value == "")
													{
														alert("Please couldn't let message blank");
														return false;	
													}
													else
													{
														if(document.contactForm.content.value.length >= 20)
														{
															var r=confirm("Do you complete your comment?");
															if (r==true)
															  {
															  return true;
															  }
															else
															  {
															  return false;
															  }
														}
														else
														{
															alert("Don't spam please");
															return false;	
														}
													}
												}
											}
										</script>
                                        </table>
                                    </form>
                                </table>
                            </div>
				       	</div>
                        <div id="advertise">					
							<a href="petmart.html"><img src="images/discount.jpg" width="300" height="790" alt="Pet Shop" title="Pet Shop"></a>
					    </div>
		     		</div>
				   	<!-- InstanceEndEditable -->
				   	
                    <marquee class="marquee">Lorem ipsum dolor sit amet, consectetuer adepiscing elit, sed diam nonummy nib.</marquee>
                    
                    <div class="featured">
				        <ul>
							<li><a href="index.php"><img src="images/organic-and-chemical-free.jpg" width="300" height="90" alt="Pet Shop" title="Pet Shop" ></a></li>
							<li><a href="index.php"><img src="images/good-food.jpg" width="300" height="90" alt="Pet Shop" title="Pet Shop" ></a></li>
							<li class="last"><a href="index.php"><img src="images/pet-grooming.jpg" width="300" height="90" alt="Pet Shop" title="Pet Shop" ></a></li>
						</ul>
				        
				   </div>
				  
			
			</div>
			
			<div id="footer">
			        <div class="section">
						<ul>
							<li>
								<img src="images/friendly-pets.jpg" width="240" height="186" alt="Pet Shop" title="Pet Shop">
								<h2><a href="index.php">Friendly Pets</a></h2>
								<p>
								   Lorem ipsum dolor sit amet, consectetuer adepiscing elit,  sed diam nonummy nib. <a class="more" href="index.php">Read More</a> 
								</p>
							</li>	
							<li>
								<img src="images/pet-lover2.jpg" width="240" height="186" alt="Pet Shop" title="Pet Shop">
								<h2><a href="index.php">How dangerous are they</a></h2>
								<p>
								   Lorem ipsum dolor sit amet, cons ectetuer adepis cing, sed diam euis. <a class="more" href="index.php">Read More</a> 
								</p>
							</li>	
							<li>
								<img src="images/healthy-dog.jpg" width="240" height="186" alt="Pet Shop" title="Pet Shop">
								<h2><a href="index.php">Keep them healthy</a></h2>
								<p>
								   Lorem ipsum dolor sit amet, consectetuer adepiscing elit,  sed diam nonu mmy. <a class="more" href="index.php">Read More</a> 
								</p>
							</li>	
							<li>
								
								<h2><a href="index.php">Love...love...love...pets</a></h2>
								<p>
								     Lorem ipsum dolor sit amet, consectetuer adepiscing elit,  sed diameusim. <a class="more" href="index.php">Read More</a> 
								</p>
								<img src="images/pet-lover.jpg" width="240" height="186" alt="Pet Shop" title="Pet Shop">
							</li>	
						</ul>
					</div>
					<div id="footnote">
						<div class="section">
						  TommyDo designed &copy; 2014 <a href="index.php">Petshop</a>. All Rights Reserved.
						</div>
					</div>
			</div>
			
	
</body>
<!-- InstanceEnd --></html>